package com.qingcloud.adminbackend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qingcloud.adminbackend.entity.sysorg.SysOrgLogoDTO;
import com.qingcloud.adminbackend.entity.user.UserRoleBo;
import com.qingcloud.adminbackend.entity.userrole.SysUserRole;
import com.qingcloud.adminbackend.entity.userrole.UserRoleVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 用户和身份关联表 Mapper 接口
 * </p>
 *
 * @author luozehua
 * @since 2018-12-21
 */
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {

    List<UserRoleVO> findRoleByUserId(@Param("userId") String userId);

    List<UserRoleBo> findRoleInfoByUserId(@Param("userId") String userId);

    List<String> findRoleFunction(@Param("roleIds") List<String> roleIds);

    String findUserDataFunction(@Param("userId") String userId);

    int batchInsert(@Param("userRoleList") List<SysUserRole> userRoleList);

    Set<Integer> findManageAppId(@Param("userId") String userId);

}
